-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Python 3.12 upgrade #67
Enhancement: Python 3.12 upgrade #67
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not tested it on local yet, but the changes look good.
ModuleNotFoundError: No module named '_sqlite3' fixed above error on line >>> RUN python manage.py compilemessages
@@ -27,15 +27,26 @@ WORKDIR /openedx/discovery | |||
RUN echo "{}" > /openedx/config.yml | |||
ENV DISCOVERY_CFG /openedx/config.yml | |||
|
|||
# Install python venv | |||
RUN python3 -m venv ../venv/ | |||
# Install pyenv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we inherit FROM the python:3.12-bookworm image instead of installing python manually with pyenv? These steps make the build more complex, and I'd rather not use them if possible at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P.S. this is on my todo list to test out python build using python images. That can be done in a followup PR, in my opinion (once tested).
Why do we want to use bookworm specifically? why not slim?
@regisb @DawoudSheraz Tested on my local system and Image building is successful using this branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, image builds as expected.
=> [minimal 7/19] RUN echo "{}" > /openedx/config.yml 0.2s => ERROR [minimal 8/19] RUN git clone https://github.com/pyenv/pyenv /opt/pyenv --branch v2.3.36 --depth 1 0.4s ------ > importing cache manifest from docker.io/overhangio/openedx-discovery:17.0.0-nightly-cache: ------ ------ > [minimal 8/19] RUN git clone https://github.com/pyenv/pyenv /opt/pyenv --branch v2.3.36 --depth 1: 0.341 fatal: could not create work tree dir '/opt/pyenv': Permission denied ------ Dockerfile:36 -------------------- 34 | ENV PYENV_ROOT /opt/pyenv 35 | # USER root 36 | >>> RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.36 --depth 1 37 | # Install Python 38 | RUN $PYENV_ROOT/bin/pyenv install $PYTHON_VERSION -------------------- ERROR: failed to solve: process "/bin/sh -c git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.36 --depth 1" did not complete successfully: exit code: 128
@Faraz32123 you should be good to merge this for now. We can work on using python image in a followup PR. |
close #62